<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>物流单查询</title>
</head>
<body>
    <a href="/storehome/" class="button">返回</a>
    <h2>订单查询</h2>
    {% if messages %}
        <ul class="messages">
            {% for message in messages %}
                <li {% if message.tags %} class="{{ message.tags }}"{% endif %}>{{ message }}</li>
            {% endfor %}
        </ul>
    {% endif %}
    <form action="/stream/" method="post">
        <div class="mb-3">
            <label for="id_orderid" class="form-label">订单号</label>
            {{ form.orderid.errors }}
            {{ form.orderid }}
        </div>
        <div class="mb-3">
            <label for="id_orderid" class="form-label">物流单号</label>
            {{ form.tracking_number.errors }}
            {{ form.tracking_number }}
        </div>
            {% csrf_token %}
            <button type="submit" name="action" value="1">查询所有物流单</button>
            <button type="submit" name="action" value="4">录入物流单</button>
    </form>
    {% if order %}
        {% for order in order %}
            <p><strong>tracking_number:</strong> {{ order.tracking_number }}
            <strong>orderid:</strong> {{ order.orderid }}
            <strong>logistics_company_id:</strong> {{ order.logistics_company_id }}
            <strong>freight:</strong> {{ order.freight }}
            <strong>delivery_time:</strong> {{ order.delivery_time }}
            <strong>receipt_time:</strong> {{ order.receipt_time }}</p>
        {% endfor %}
    {% endif %}
</body>
</html>

